package com.sc.controller;

import com.github.pagehelper.PageInfo;
import com.sc.pojo.Huser;
import com.sc.pojo.Tuser;
import com.sc.service.HuserService;
import com.sc.service.TuserService;
import com.sc.service.impl.HuserServiceImpl;
import com.sc.service.impl.TuserServiceImpl;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@Controller
public class TuserController {
    TuserService us = new TuserServiceImpl();
    @RequestMapping("/Tshow")
    public String Tshow(@RequestParam(defaultValue = "1") Integer pageNum,
                       @RequestParam(defaultValue = "3") Integer pageSize,
                       Map m) {
        PageInfo<Tuser> p1 = us.show(pageNum,pageSize);
        m.put("p1",p1);
        return "/Tuser/list";
    }

    @RequestMapping("/Ttolist")
    public String Ttolist() {
        return "/Tuser/list";
    }
}
